<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">
  
  <head>
    
    <%@ include file="/WEB-INF/include/meta.jsp"%>
    <%@ include file="/WEB-INF/include/css.jsp"%>
    
  </head>
  <!-- end header -->
  <body>
    <div class="page-group">
      <div class="page page-current">
        
        <header class="bar bar-nav fs-header-small">
          <a href="${ctx.host}/profile" class="icon icon-left pull-left"></a>
          <h1 class="title">身体数据</h1>
        </header>
        
        <div class="content">
          <c:choose>
            <c:when test="${empty inbodyRecord}">
              <div class="inbody-weight row">
                <div class="col-50">
                  <h3>体重</h3>
                  <p class="date">
                    无任何记录
                  </p>
                </div>
                <div class="col-50">
                  <p class="amount">
                    --.--
                  </p>
                </div>
              </div>
              
              
              <div class="row inbody-grid">
                <div class="col-33">
                  <p>--<small>kg</small></p>
                  <p class="title">骨骼肌</p>
                  <i class="icon icon-chart"></i>
                </div>
                <div class="col-33">
                  <p>--<small>kg</small></p>
                  <p  class="title">体脂肪</p>
                  <i class="icon icon-chart"></i>
                </div>
                <div class="col-33">
                  <p>--</p>
                  <p class="title">BMI</p>
                  <i class="icon icon-chart"></i>
                </div>
                <div class="col-33">
                  <p>--</p>
                  <p class="title">体脂率</p>
                  <i class="icon icon-chart"></i>
                </div>
                <div class="col-33">
                  <p>--</p>
                  <p class="title">腰臀比</p>
                  <i class="icon icon-chart"></i>
                </div>
                <div class="col-33">
                  <p>--</p>
                  <p class="title">基础代谢</p>
                  <i class="icon icon-chart"></i>
                </div>
              </div>
             </c:when>
            <c:otherwise>
              <div class="inbody-weight row">
                <div class="col-50">
                  <h3>体重
                    <%-- <label class="${inbodyRecord.weight > inbodyRecord.weightMax ? 'max' : (inbodyRecord.weight < inbodyRecord.weightMin ? 'min' : 'normal')}">${inbodyRecord.weightLabel}</label> --%>
                  </h3>
                  <p class="date">
                      更新于<fmt:formatDate value="${inbodyRecord.recordTimeDate}" pattern="yyyy-MM-dd" />
                  </p>
                </div>
                <div class="col-50">
                  <p class="amount">
                    <fmt:formatNumber value="${inbodyRecord.weight}" pattern="0.0"></fmt:formatNumber>
                    <small>KG</small>
                    <a href="${ctx.host}/profile/inbody/records"></a>
                  </p>
                </div>
              </div>
              
              <div class="row inbody-grid">
                <div class="col-33">
                  <p>
                    <c:choose>
                      <c:when test="${inbodyRecord.sm == 0}">
                        -
                      </c:when>
                      <c:otherwise>
                        <fmt:formatNumber value="${inbodyRecord.sm}" pattern="0.0"></fmt:formatNumber>
                      </c:otherwise>
                    </c:choose>
                    <small>kg</small>
                  </p>
                  <p class="title">骨骼肌<%-- <label class="${inbodyRecord.sm > inbodyRecord.smMax ? 'max' : (inbodyRecord.sm < inbodyRecord.smMin ? 'min' : 'normal')}">${inbodyRecord.smLabel}</label> --%></p>
                  <a href="${ctx.host}/profile/inbody/records"></a>
                  <i class="icon icon-chart"></i>
                </div>
                <div class="col-33">
                  <p>
                    <c:choose>
                      <c:when test="${inbodyRecord.bf == 0}">
                        -
                      </c:when>
                      <c:otherwise>
                        <fmt:formatNumber value="${inbodyRecord.bf}" pattern="0.0"></fmt:formatNumber>
                      </c:otherwise>
                    </c:choose>
                    <small>kg</small>
                  </p>
                  <p  class="title">体脂肪<%-- <label class="${inbodyRecord.bf > inbodyRecord.bfMax ? 'max' : (inbodyRecord.bf < inbodyRecord.bfMin ? 'min' : 'normal')}">${inbodyRecord.bfLabel}</label> --%></p>
                  <a href="${ctx.host}/profile/inbody/records"></a>
                  <i class="icon icon-chart"></i>
                </div>
                <div class="col-33">
                  <p>
                    <c:choose>
                      <c:when test="${inbodyRecord.bmi == 0}">
                        -
                      </c:when>
                      <c:otherwise>
                        <fmt:formatNumber value="${inbodyRecord.bmi}" pattern="0.0"></fmt:formatNumber>
                      </c:otherwise>
                    </c:choose>
                  </p>
                  <p class="title">BMI<%-- <label class="${inbodyRecord.bmi > inbodyRecord.bmiMax ? 'max' : (inbodyRecord.bmi < inbodyRecord.bmiMin ? 'min' : 'normal')}">${inbodyRecord.bmiLabel}</label> --%></p>
                  <a href="${ctx.host}/profile/inbody/records"></a>
                  <i class="icon icon-chart"></i>
                </div>
                <div class="col-33">
                  <p>
                  <c:choose>
                    <c:when test="${inbodyRecord.bfr == 0}">
                      -
                    </c:when>
                    <c:otherwise>
                      <fmt:formatNumber value="${inbodyRecord.bfr * 100}" pattern="0.0"></fmt:formatNumber>
                      <small>%</small>
                    </c:otherwise>
                  </c:choose>
                  </p>
                  <p class="title">体脂率<%-- <label class="${inbodyRecord.bfr > inbodyRecord.bfrMax ? 'max' : (inbodyRecord.bfr < inbodyRecord.bfrMin ? 'min' : 'normal')}">${inbodyRecord.bfrLabel}</label> --%></p>
                  <a href="${ctx.host}/profile/inbody/records"></a>
                  <i class="icon icon-chart"></i>
                </div>
                <div class="col-33">
                  <p>
                    <c:choose>
                      <c:when test="${inbodyRecord.whr == 0}">
                        -
                      </c:when>
                      <c:otherwise>
                        <fmt:formatNumber value="${inbodyRecord.whr}" pattern="0.0"></fmt:formatNumber>
                      </c:otherwise>
                    </c:choose>
                  </p>
                  <p class="title">腰臀比<%-- <label class="${inbodyRecord.whr < inbodyRecord.whrMin ? 'min' : 'normal'}">${inbodyRecord.whrLabel}</label> --%></p>
                  <a href="${ctx.host}/profile/inbody/records"></a>
                  <i class="icon icon-chart"></i>
                </div>
                <div class="col-33">
                  <p>
                    <c:choose>
                      <c:when test="${inbodyRecord.bm == 0}">
                        -
                      </c:when>
                      <c:otherwise>
                        <fmt:formatNumber value="${inbodyRecord.bm}" pattern="0.0"></fmt:formatNumber>
                      </c:otherwise>
                    </c:choose>
                  </p>
                  <p class="title">基础代谢<%-- <label class="${inbodyRecord.bm > inbodyRecord.bmMax ? 'max' : (inbodyRecord.bm < inbodyRecord.bmMin ? 'min' : 'normal')}">${inbodyRecord.bmLabel}</label> --%></p>
                  <a href="${ctx.host}/profile/inbody/records" href=""></a>
                  <i class="icon icon-chart"></i>
                </div>
              </div>
            </c:otherwise>
          </c:choose>
          
          <p class='text-center' style="font-size: 14px; color: #999;">如何获取身体数据？<br>快来人马君线下门店免费体测吧！</p>
          
        </div>
        <!-- End Content -->
        
      </div>
    </div>
    
    <%@ include file="/WEB-INF/include/script.jsp"%>
    
  </body>
</html>